package model

import (
	"gitee.com/enjoy_5/order-rpc/internal/model/order"
	"gitee.com/enjoy_5/order-rpc/internal/model/product"
	"gitee.com/xuxinzhi2206/corehub/database/mysql"
	"gorm.io/gorm"
)

func AutoMigrate() error {
	return mysql.WithMysql(func(db *gorm.DB) error {
		return db.AutoMigrate(
			&order.Order{},
			&product.OrderGoods{},
		)
	})
}
